<template>
  <view class="content">
    <image class="logo" src="/static/logo.png"></image>
    <view class="text-area">
      <text class="title">{{title}}</text>
    </view>
    <view class="btn" @click="six">测试按钮</view>
  </view>
</template>

<script>

const SixUniTts = uni.requireNativePlugin("SixUniTts")

export default {
  data() {
    return {
      title: 'Hello'
    }
  },
  onLoad() {

  },

  mounted () {
    // 初始化
    SixUniTts.initSixUniTts(res => {
      uni.showToast({
        title: JSON.stringify(res),
        duration: 2000
      })
    })
  },

  methods: {
    six () {
      uni.showToast({
        title: '进来了111',
        duration: 2000
      })

      SixUniTts.startSpeech({
        speechText: 'yxx是世界上最漂亮女孩'
      })
    }

  }
}
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
.btn {
  width: 200rpx;
  height: 80rpx;
  line-height: 80rpx;
  background: #F0AD4E;
  text-align: center;
  color: #FFFFFF;
  border-radius: 20rpx;
  margin-top: 30rpx;
}
</style>